package com.pearl.sharding.level.table.demo;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.pearl.sharding.level.table.demo.entity.OrderEntity;
import com.pearl.sharding.level.table.demo.mapper.GoodsMapper;
import com.pearl.sharding.level.table.demo.mapper.OrderMapper;
import com.pearl.sharding.level.table.demo.pojo.Goods;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class test {

    @Autowired
    OrderMapper orderMapper;
    GoodsMapper goodsMapper;
    @Test
    void addOrder() {
        OrderEntity order = new OrderEntity();
        order.setAddress("小米手机");
        order.setId((long) 131378L);
        order.setProductName("华为手机");
        orderMapper.insert(order);
    }
//    @Test
//    void addGoods() {
//        Goods good = new Goods();
//        good.setGname("小米手机");
//        good.setUserId(100L);
//        good.setGstatus("已发布");
//        goodsMapper.insert(good);
//        Goods good2 = new Goods();
//        good2.setGname("华为手机");
//        good2.setUserId(99L);
//        good2.setGstatus("已发布");
//        goodsMapper.insert(good2);
//    }




}
